package com.cyxy.ojbackendquestionservice.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyxy.ojbackendmodel.model.dto.question.QuestionQueryRequest;
import com.cyxy.ojbackendmodel.model.entity.Question;
import com.cyxy.ojbackendmodel.model.vo.QuestionVO;
import javax.servlet.http.HttpServletRequest;

//题目服务
public interface QuestionService extends IService<Question> {

   //校验
    void validQuestion(Question question, boolean add);

    //获取查询条件
    QueryWrapper<Question> getQueryWrapper(QuestionQueryRequest questionQueryRequest);
    
    //获取题目封装
    QuestionVO getQuestionVO(Question question, HttpServletRequest request);

    //分页获取题目封装
    Page<QuestionVO> getQuestionVOPage(Page<Question> questionPage, HttpServletRequest request);
}
